﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

namespace T.FAS.Runtime.Metadata.Entity.MF
{
    // 节点基类
    public abstract class NodeBase : ShapeBase
    {
        [JsonProperty("position")]
        public Position Position { get; set; }

        [JsonProperty("size")]
        public Size Size { get; set; }

        [JsonProperty("view")]
        public string View { get; set; }

        [JsonProperty("data")]
        public object Data { get; set; } // 由具体节点类型重写
        [JsonProperty("resizing",NullValueHandling = NullValueHandling.Ignore)]
        public Resizing resizing { get; set; }

    }
    public class Resizing
    {
        [JsonProperty("enabled")]
        public bool enabled { get; set; }
        [JsonProperty("maxHeight")]
        public int maxHeight { get; set; }
        [JsonProperty("maxWidth")]
        public int maxWidth { get; set; }
        [JsonProperty("minHeight")]
        public int minHeight { get; set; }
        [JsonProperty("minWidth")]
        public int minWidth { get; set; }
        [JsonProperty("preserveAspectRatio")]
        public bool preserveAspectRatio { get; set; }
    }
}
